package com.education.welco.service.impl;

import java.util.List;

import com.education.common.utils.Convert;
import com.education.welco.mapper.SCatalogWorkSynMapper;
import com.education.welco.pojo.SCatalogWorkSyn;
import com.education.welco.service.ISCatalogWorkSynService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 备课查看作业 服务层实现
 *
 * @author d
 * @date 2020-05-14
 */
@Service
public class SCatalogWorkSynServiceImpl implements ISCatalogWorkSynService {

    @Autowired
    private SCatalogWorkSynMapper sCatalogWorkSynMapper;

    /**
     * 查询备课查看作业信息
     *
     * @param id 备课查看作业ID
     * @return 备课查看作业信息
     */
    @Override
    public SCatalogWorkSyn selectSCatalogWorkSynById(Integer id) {
        return sCatalogWorkSynMapper.selectSCatalogWorkSynById(id);
    }

    /**
     * 查询备课查看作业列表
     *
     * @param sCatalogWorkSyn 备课查看作业信息
     * @return 备课查看作业集合
     */
    @Override
    public List<SCatalogWorkSyn> selectSCatalogWorkSynList(SCatalogWorkSyn sCatalogWorkSyn) {
        return sCatalogWorkSynMapper.selectSCatalogWorkSynList(sCatalogWorkSyn);
    }

    /**
     * 新增备课查看作业
     *
     * @param sCatalogWorkSyn 备课查看作业信息
     * @return 结果
     */
    @Override
    public int insertSCatalogWorkSyn(SCatalogWorkSyn sCatalogWorkSyn) {
        return sCatalogWorkSynMapper.insertSCatalogWorkSyn(sCatalogWorkSyn);
    }

    /**
     * 删除备课查看作业
     *
     * @param catalogId 备课查看作业ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogWorkSynByCatalogId(Integer catalogId) {
        return sCatalogWorkSynMapper.deleteSCatalogWorkSynByCatalogId(catalogId);
    }

    /**
     * 修改备课查看作业
     *
     * @param sCatalogWorkSyn 备课查看作业信息
     * @return 结果
     */
    @Override
    public int updateSCatalogWorkSyn(SCatalogWorkSyn sCatalogWorkSyn) {
        return sCatalogWorkSynMapper.updateSCatalogWorkSyn(sCatalogWorkSyn);
    }

    /**
     * 删除备课查看作业对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogWorkSynByIds(String ids) {
        return sCatalogWorkSynMapper.deleteSCatalogWorkSynByIds(Convert.toStrArray(ids));
    }
}